import requests


# print(
#     requests.get("http://localhost:5555/postgres/ods/v1/staff").json()
# )
# print(
#     requests.get("http://localhost:5555/postgres/ods/v1/staff?select=id, name&where=id > 3&limit=100").json()
# )
#
# print(
#     requests.get("http://127.0.0.1:5555/items/?q=id,name").json()
# )

# print(
#     requests.get("http://127.0.0.1:5555/user2/?password=satori4561123").json()
# )

# print(
#     requests.get("http://127.0.0.1:5555/girl/123?name=中国&age=12&hobby=play baseball&hobby=play game").json()
# )

# print(
#     requests.post(
#         url="http://localhost:5555/girl",
#         json={
#             "name": "张三",
#             "age": 17,
#             "length": 155.5,
#             "hobby": ["play", "xxx"]
#         }
#     ).json()
# )

# print(
#     requests.post(
#         url="http://localhost:5555/girl1",
#         json={
#             "name": "张三",
#             "age": 17,
#             "length": 155.5,
#             "hobby": ["play", "xxx"]
#         }
#     ).json()
# )

# print(
#     requests.post(
#         url="http://localhost:5555/girl3/001?q=yyy",
#         json={
#             "name": "张三",
#             "age": 17,
#             "length": 155.5,
#             "hobby": ["play", "xxx"]
#         }
#     ).json()
# )

# print(
#     requests.post(
#         url="http://localhost:5555/girl4",
#         data={
#             "name": "张三",
#             "age": 17,
#             "length": 155.5
#         }
#     ).json()
# )

# print(
#     requests.post(
#         url='http://localhost:5555/user',
#         data={
#             "username": "sssss",
#             "password": "123123456"
#         }
#     ).json()
# )

# print(
#     requests.post(
#         url='http://localhost:5555/file1',
#         files={
#             "file": open(r"test1.py", "rb")
#         }
#     ).json()
# )
#
# print(
#     requests.post(
#         url='http://localhost:5555/file2',
#         files={
#             "file": open(r"test1.py", "rb")
#         }
#     ).json()
# )

# print(
#     requests.post(
#         url='http://localhost:5555/file',
#         files=[
#             ("files", open(r"test1.py", "rb")),
#             ("files", open(r"main2.py", "rb")),
#             ("files", open(r"main2.py", "rb"))
#         ]
#     ).json()
# )

print(
    requests.get(
        url="http://localhost:5555/items/foo1"
    ).json()
)